<template>
    父组件------{{ message }}
    <hr>
    <SlotSubComponent>
        <p>{{ message }}</p>
    </SlotSubComponent>
</template>

<script setup>
    import SlotSubComponent from './SlotSubComponent.vue';
    const message = '这是自定义组件'
</script>